<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css中的背景</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color:red;
            background-image: url("images/logo2.png");
            /* 背景重复 
             background-repeat:repeat| no-repeat|repeat-x|repeat-y; */
            background-repeat: no-repeat;
            /* 背景位置 */
            background-position-x: center;
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>